package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.domain.Permission;
import cn.wolfcode.crm.query.EmployeeQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);

    void insertRealation(@Param("employeeId") Long employeeId, @Param("roleId") long roleId);

    void batchDelete(Long[] ids);


    List<Employee> queryForList(EmployeeQuery query);

    Employee isExist(Employee employee);

    List<String> getPermissions(Long id);

    Employee selectByUsername(String username);

    List<Employee> listEmployeesByRoleSns(String[] roleSns);
}